package cn.sciento.wechat.service.impl;

import com.alibaba.fastjson.JSON;
import javax.annotation.Resource;
import cn.sciento.wechat.dto.CustomServiceMessageStatusDTO;
import cn.sciento.wechat.dto.CustomerServiceAccountDTO;
import cn.sciento.wechat.dto.DefaultResultDTO;
import cn.sciento.wechat.dto.DeleteGroupMessageDTO;
import cn.sciento.wechat.dto.GetAllCustomerServiceAccountResultDTO;
import cn.sciento.wechat.dto.GetCurrentAutoReplyInfoResultDTO;
import cn.sciento.wechat.dto.GetGroupMessageStatusResultDTO;
import cn.sciento.wechat.dto.GetGroupSendMessageSpeedResultDTO;
import cn.sciento.wechat.dto.GroupImageMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupImageMessageByOpenIdDTO;
import cn.sciento.wechat.dto.GroupMessageResultDTO;
import cn.sciento.wechat.dto.GroupMpNewsMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupMpNewsMessageByOpenIdDTO;
import cn.sciento.wechat.dto.GroupTextMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupTextMessageByOpenIdDTO;
import cn.sciento.wechat.dto.GroupVideoMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupVideoMessageByOpenIdDTO;
import cn.sciento.wechat.dto.GroupVoiceMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupVoiceMessageByOpenIdDTO;
import cn.sciento.wechat.dto.GroupWxCardMessageByMarkDTO;
import cn.sciento.wechat.dto.GroupWxCardMessageByOpenIdDTO;
import cn.sciento.wechat.dto.ImageMassageDTO;
import cn.sciento.wechat.dto.MediaDTO;
import cn.sciento.wechat.dto.MenuMessageDTO;
import cn.sciento.wechat.dto.MiniProgramPageMessageDTO;
import cn.sciento.wechat.dto.MpNewsMessageDTO;
import cn.sciento.wechat.dto.MusicMessageDTO;
import cn.sciento.wechat.dto.NewsMessageDTO;
import cn.sciento.wechat.dto.PreviewImageMessageDTO;
import cn.sciento.wechat.dto.PreviewMessageResultDTO;
import cn.sciento.wechat.dto.PreviewMpNewsMessageDTO;
import cn.sciento.wechat.dto.PreviewTextMessageDTO;
import cn.sciento.wechat.dto.PreviewVideoMessageDTO;
import cn.sciento.wechat.dto.PreviewVoiceMessageDTO;
import cn.sciento.wechat.dto.PreviewWxCardMessageDTO;
import cn.sciento.wechat.dto.SubscribeTemplateMessageDTO;
import cn.sciento.wechat.dto.TextMessageDTO;
import cn.sciento.wechat.dto.UploadMediaAndGetUrlResultDTO;
import cn.sciento.wechat.dto.UploadNewsMaterialDTO;
import cn.sciento.wechat.dto.UploadNewsMaterialResultDTO;
import cn.sciento.wechat.dto.VideoMessageDTO;
import cn.sciento.wechat.dto.VoiceMessageDTO;
import cn.sciento.wechat.dto.WxCardMessageDTO;
import cn.sciento.wechat.service.WeChatMessageManageService;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;

public class WeChatMessageManageServiceImp implements WeChatMessageManageService {
  @Resource(name = "wdRestTemplate")
  protected RestTemplate restTemplate;
  
  public DefaultResultDTO addCustomerServiceAccount(String accessToken, CustomerServiceAccountDTO customerServiceAccountDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/customservice/kfaccount/add?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(customerServiceAccountDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO updateCustomerServiceAccount(String accessToken, CustomerServiceAccountDTO customerServiceAccountDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/customservice/kfaccount/update?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(customerServiceAccountDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO deleteCustomerServiceAccount(String accessToken, CustomerServiceAccountDTO customerServiceAccountDTO) {
    return (DefaultResultDTO)this.restTemplate.exchange("https://api.weixin.qq.com/customservice/kfaccount/del?access_token=" + accessToken, HttpMethod.GET, new HttpEntity(JSON.toJSONString(customerServiceAccountDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class).getBody();
  }
  
  public DefaultResultDTO setCustomerServiceAccountHeadImage(String accessToken, MediaDTO media) {
    LinkedMultiValueMap linkedMultiValueMap = new LinkedMultiValueMap();
    linkedMultiValueMap.add("filename", media.getFilename());
    linkedMultiValueMap.add("Content-Type", media.getContentType());
    linkedMultiValueMap.add("contentLength", media.getFileLength());
    HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity(linkedMultiValueMap, (MultiValueMap)buildFormDateHttpHeaders());
    return (DefaultResultDTO)this.restTemplate.postForObject("http://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token=?access_token=" + accessToken, entity, DefaultResultDTO.class);
  }
  
  public GetAllCustomerServiceAccountResultDTO getAllCustomerServiceAccount(String accessToken) {
    return (GetAllCustomerServiceAccountResultDTO)this.restTemplate.getForObject("https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token=" + accessToken, GetAllCustomerServiceAccountResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceTextMessage(String accessToken, TextMessageDTO textMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(textMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceImageMessage(String accessToken, ImageMassageDTO imageMassageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(imageMassageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceVoiceMessage(String accessToken, VoiceMessageDTO voiceMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(voiceMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceVideoMessage(String accessToken, VideoMessageDTO videoMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(videoMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceMusicMessage(String accessToken, MusicMessageDTO musicMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(musicMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceNewsMessage(String accessToken, NewsMessageDTO newsMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(newsMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceMpNewsMessage(String accessToken, MpNewsMessageDTO mpNewsMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(mpNewsMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceMenuMessage(String accessToken, MenuMessageDTO menuMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(menuMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceWxCardMessage(String accessToken, WxCardMessageDTO wxCardMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(wxCardMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO sendCustomServiceMiniProgramPageMessage(String accessToken, MiniProgramPageMessageDTO miniprogrampageMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(miniprogrampageMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO customServiceMessageStatus(String accessToken, CustomServiceMessageStatusDTO customServiceMessageStatusDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject(" POST https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(customServiceMessageStatusDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public UploadMediaAndGetUrlResultDTO uploadMediaAndGetUrl(String accessToken, MediaDTO media) {
    LinkedMultiValueMap linkedMultiValueMap = new LinkedMultiValueMap();
    linkedMultiValueMap.add("filename", media.getFilename());
    linkedMultiValueMap.add("Content-Type", media.getContentType());
    linkedMultiValueMap.add("contentLength", media.getFileLength());
    HttpEntity<MultiValueMap<String, String>> entity = new HttpEntity(linkedMultiValueMap, (MultiValueMap)buildFormDateHttpHeaders());
    return (UploadMediaAndGetUrlResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/media/uploadimg?access_token=?access_token=" + accessToken, entity, UploadMediaAndGetUrlResultDTO.class);
  }
  
  public UploadNewsMaterialResultDTO uploadNewsMaterial(String accessToken, UploadNewsMaterialDTO uploadNewsMaterialDTO) {
    return (UploadNewsMaterialResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(uploadNewsMaterialDTO), (MultiValueMap)buildHttpHeaders()), UploadNewsMaterialResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupTextMessageByMark(String accessToken, GroupTextMessageByMarkDTO groupTextMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupTextMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupMpNewsMessageByMark(String accessToken, GroupMpNewsMessageByMarkDTO groupMpNewsMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupMpNewsMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupVoiceMessageByMark(String accessToken, GroupVoiceMessageByMarkDTO groupVoiceMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupVoiceMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupImageMessageByMark(String accessToken, GroupImageMessageByMarkDTO groupImageMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupImageMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupVideoMessageByMark(String accessToken, GroupVideoMessageByMarkDTO groupVideoMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupVideoMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupWxCardMessageByMark(String accessToken, GroupWxCardMessageByMarkDTO groupWxCardMessageByMarkDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupWxCardMessageByMarkDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupTextMessageByOpenId(String accessToken, GroupTextMessageByOpenIdDTO groupTextMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupTextMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupMpNewsMessageByOpenId(String accessToken, GroupMpNewsMessageByOpenIdDTO groupMpNewsMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupMpNewsMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupVoiceMessageByOpenId(String accessToken, GroupVoiceMessageByOpenIdDTO groupVoiceMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupVoiceMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupImageMessageByOpenId(String accessToken, GroupImageMessageByOpenIdDTO groupImageMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupImageMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupVideoMessageByOpenId(String accessToken, GroupVideoMessageByOpenIdDTO groupVideoMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupVideoMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public GroupMessageResultDTO sendGroupWxCardMessageByOpenId(String accessToken, GroupWxCardMessageByOpenIdDTO groupWxCardMessageByOpenIdDTO) {
    return (GroupMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(groupWxCardMessageByOpenIdDTO), (MultiValueMap)buildHttpHeaders()), GroupMessageResultDTO.class);
  }
  
  public DefaultResultDTO deleteGroupMessage(String accessToken, DeleteGroupMessageDTO deleteGroupMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(deleteGroupMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewMpNewsMessage(String accessToken, PreviewMpNewsMessageDTO previewMpNewsMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewMpNewsMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewTextMessage(String accessToken, PreviewTextMessageDTO previewTextMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewTextMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewImageMessage(String accessToken, PreviewImageMessageDTO previewImageMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewImageMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewVideoMessage(String accessToken, PreviewVideoMessageDTO previewVideoMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewVideoMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewVoiceMessage(String accessToken, PreviewVoiceMessageDTO previewVoiceMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewVoiceMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public PreviewMessageResultDTO sendPreviewWxCardMessage(String accessToken, PreviewWxCardMessageDTO previewWxCardMessageDTO) {
    return (PreviewMessageResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(previewWxCardMessageDTO), (MultiValueMap)buildHttpHeaders()), PreviewMessageResultDTO.class);
  }
  
  public GetGroupMessageStatusResultDTO getGroupMessageStatus(String accessToken, String msg_id) {
    return (GetGroupMessageStatusResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/get?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(msg_id), (MultiValueMap)buildHttpHeaders()), GetGroupMessageStatusResultDTO.class);
  }
  
  public GetGroupSendMessageSpeedResultDTO getGroupSendMessageSpeed(String accessToken) {
    return (GetGroupSendMessageSpeedResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/speed/get?access_token=" + accessToken, null, GetGroupSendMessageSpeedResultDTO.class);
  }
  
  public DefaultResultDTO setGroupSendMessageSpeed(String accessToken, Long speed) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/mass/speed/set?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(speed), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO subscribeTemplateMessageToUser(String accessToken, SubscribeTemplateMessageDTO subscribeTemplateMessageDTO) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/message/template/subscribe?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(subscribeTemplateMessageDTO), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public DefaultResultDTO reset(String accessToken, String appid) {
    return (DefaultResultDTO)this.restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/clear_quota?access_token=" + accessToken, new HttpEntity(JSON.toJSONString(appid), (MultiValueMap)buildHttpHeaders()), DefaultResultDTO.class);
  }
  
  public GetCurrentAutoReplyInfoResultDTO getCurrentAutoReplyInfo(String accessToken) {
    return (GetCurrentAutoReplyInfoResultDTO)this.restTemplate.getForObject("https://api.weixin.qq.com/cgi-bin/get_current_autoreply_info?access_token=" + accessToken, GetCurrentAutoReplyInfoResultDTO.class);
  }
  
  protected HttpHeaders buildHttpHeaders() {
    HttpHeaders httpHeaders = new HttpHeaders();
    httpHeaders.set("Content-Type", "application/json");
    return httpHeaders;
  }
  
  protected HttpHeaders buildFormDateHttpHeaders() {
    HttpHeaders httpHeaders = new HttpHeaders();
    httpHeaders.set("Content-Type", "multipart/form-data");
    return httpHeaders;
  }
}
